From 25a56013c5eb34735cd0862ed47afac35fb676b9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Mar 2006 06:05:57 +0000 Subject: [PATCH] Another one --- ChangeLog | 1 + ChangeLog.pre-2-10 | 1 + gtk/gtktexttag.c | 6 +----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e11f546910..257a36c92b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2006-03-26 Matthias Clasen + * gtk/gtktexttag.c (gtk_text_tag_get_property): * gtk/gtkcellrenderertext.c (gtk_cell_render_text_get_property): Avoid an unnecessary strdup. (#336013) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e11f546910..257a36c92b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,6 @@ 2006-03-26 Matthias Clasen + * gtk/gtktexttag.c (gtk_text_tag_get_property): * gtk/gtkcellrenderertext.c (gtk_cell_render_text_get_property): Avoid an unnecessary strdup. (#336013) diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index 41d691af88..d19831e502 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -1503,16 +1503,12 @@ gtk_text_tag_get_property (GObject *object, case PROP_FONT: { - /* FIXME GValue imposes a totally gratuitous string copy - * here, we could just hand off string ownership - */ gchar *str; gtk_text_tag_ensure_font (tag); str = pango_font_description_to_string (tag->values->font); - g_value_set_string (value, str); - g_free (str); + g_value_take_string (value, str); } break; -- 2.30.2